Creating a CIFS Share

After a CIFS-enabled virtual server is configured, the virtual server is viewable on the Windows Network, but no data is shared yet. To share data, a CIFS share must be created. The share name must be unique for the virtual server. A CIFS share is a named access point in a volume that enables CIFS clients to view, browse, and manipulate files on a file server. To create a CIFS share, use the protocol cifs share new command. You can create up to 128 shares on a single CIFS-enabled virtual server.

Note:

A share is tied to the CIFS configuration of its virtual server and is deleted if either the virtual server or its CIFS configuration with which it is associated is removed from the system.

When you create a share, you specify the following information:

The following example creates a CIFS share named SHARE1 on a virtual server named vs1. Its directory path is /u/eng. Opportunistic locks and browsability are specified on the share, and UNIX mode bits are explicitly set as 775 on files and 777 on directories.

node::> protocol cifs share new -vserver vs0 -share-name SHARE1
-path /u/eng -share-properties browsable,oplocks -file-umask 775
-dir-umask 777

Displaying Information about CIFS Shares

By default, the protocol cifs share show command displays the following information about CIFS shares:

  • Virtual server name

  • CIFS share name

  • Directory path

  • Share properties

  • Description, if applicable

Other information is displayed in a detailed view and if other parameters are specified. See the reference page for the command for details.

The following example displays information about all CIFS shares:

node::> protocol cifs share show
Virtual   Share         Path              Share             Description   
Server    Name                            Properties
vs0       ADMIN$        /                 browsable         -
vs0       IPC$          /                 browsable         -
vs0       ROOTSHARE     /                 browsable         -
vs1       ADMIN$        /                 browsable         -
vs1       IPC$          /                 browsable         -
vs1       ROOTSHARE     /                 oplocks           -
                                          browsable

Modifying a CIFS Share

By using the protocol cifs share modify command, you can modify the directory path, share properties, file mode bits, directory mode bits, and description of a CIFS share.

The following example modifies a CIFS share named DATA on a virtual server named vs1 to have the share properties oplocks and browsable:

node::> protocol cifs share modify -vserver vs1 -share-name DATA
-share-properties oplocks,browsable

Deleting a CIFS Share

To delete a CIFS share, use the protocol cifs share delete command. Deleting a CIFS share does not delete the data that exists in the volume that the share accesses.

Note:

If you delete a CIFS-enabled virtual server, as described in “Deleting a Virtual Server”, the virtual server's CIFS configuration and any shares defined on the CIFS server are automatically deleted. Also, any Windows-to-UNIX name mappings defined for the virtual server are removed because they require both the CIFS and NFS servers. If a virtual server's CIFS configuration is deleted, the virtual server remains, but without CIFS support (including CIFS shares).

The following example deletes a CIFS share named SHARE1 from a virtual server named vs0:

node::> protocol cifs share delete -vserver vs0 -share-name SHARE1